package com.sbj.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sbj.dto.req.OrderReq;
import com.sbj.dto.req.ShopOrderReq;
import com.sbj.dto.res.OrderItemRes;
import com.sbj.dto.res.OrderRes;
import com.sbj.dto.res.ShopOrderRes;
import com.sbj.entity.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author summer
 * @since 2024/08/10 10:02:39
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 查询商城订单
     * @param page
     * @param req
     * @return
     */
    Page<ShopOrderRes> shopOrderLists(Page<ShopOrderRes> page, @Param("req") ShopOrderReq req);

    /**
     * 订单详情
     * @param orderId
     * @return
     */
    OrderItemRes findOrderItem(@Param("orderId") Integer orderId);

    /**
     * 查询列表
     * @param page
     * @param orderReq
     * @return
     */
    Page<ShopOrderRes> findOrderLists(Page<ShopOrderRes> page, @Param("orderReq") OrderReq orderReq);
}
